<template>
  <button class="qui-btn" v-on:click="btnClickEvent">
    <slot name="icon"></slot>
    <span>{{msg}}</span>
  </button>
</template>

<script>
  export default {
    props: {
      msg: {
        default: '按钮'
      },
    },
    data: function() {
      /*简写 data() {}*/
      return {
        message: '名称'
      }
    },
    methods: {
      btnClickEvent: function () {
        console.log("子组件事件：" + this.msg);
        this.$emit('btnClickEvent');
      },
    },
  };
</script>
<style scoped>
  @import './css/reset.import.css';
  @import './css/qui-btn.import.css';
</style>


